<template>
  <div class="my-search-box">
    <search
      @result-click="resultClick"
      @change="getResult"
      :results="results"
      v-model="value"
      position="absolute"
      auto-scroll-to-top
      @focus="onFocus"
      @cancel="onCancel"
      @submit="onSubmit"
      :auto-fixed="false"
      ref="search"
    ></search>
  </div>
</template>
<script>
import { Search } from 'vux'
export default {
  name: 'MySearch',
  components: {
    Search
  },
  data () {
    return {

    }
  },
  methods: {
    onFocus () {
      this.$emit('on-focus')
    },
    onCancel () {
      this.$emit('on-cancel')
    },
    onSubmit () {
      this.$emit('on-submit')
    }
  }
}
</script>
<style lang="less">
</style>
